package no.ffi.gismoidm.discovery;

import java.io.Serializable;
import java.util.List;
import no.ffi.gismoidm.attrex.BooleanOperand;
import no.ffi.tpm.crypto.CryptoOperations;

/**
 *
 * @author anders
 */
public class DiscoveryAnnouncement implements Serializable {
   public String serviceURL,idpURL;
   public List serviceDescriptor;
   public byte[] parameterClass;
   public Integer protocolClass;
   public BooleanOperand accessRequirements;
       
   public void setParameterClass(Class p) {
      parameterClass = CryptoOperations.serialize(p);
   }
   public Class getParameterClass() {
      return (Class)CryptoOperations.deserialize(parameterClass);
   }
   
   public static void main(String args[]) {
       Class da = DiscoveryAnnouncement.class;
       byte[] b = CryptoOperations.serialize(da);
       Class p = (Class)CryptoOperations.deserialize(b);
       System.out.println(p.getName());
   }
}
